<?php

function print_category_tree($arr)
{
     if(is_array($arr))
     {
	    foreach($arr as $row)
		{
		    echo '<option value="'.$row['id'].'">'.$row['cat_name'].'</option>';
			if(!empty($row['child']))
			{
			   print_category_tree($row['child']);
			}
		}
      }	 
}

